assume cs:codesg, ds:datasg
datasg segment
           db 'As398*#<h!Hb$9M'
    big    db 0
    small  db 0
    letter db 0
    digit  db 0
    other  db 0
datasg ends
codesg segment
    start:      mov  ax, datasg
                mov  ds, ax

                mov  cx, 15
                mov  bx, 0
    s:          mov  al,[bx]

                cmp  al, 48         ; '0'
                jb   otherResult
                cmp  al, 58         ; '9' - 1
                jb   digitResult
                cmp  al, 65         ; 'A'
                jb   otherResult
                cmp  al, 91         ; 'Z' + 1
                jb   bigResult
                cmp  al, 97         ; 'a'
                jb   otherResult
                cmp  al, 123        ; 'z' + 1
                jb   smallresult
                jmp  otherResult


    bigResult:  
                inc  big
                inc  letter
                jmp  next
    smallResult:
                inc  small
                inc  letter
                jmp  next
    digitResult:
                inc  digit
                jmp  next
    otherResult:
                inc  other
    next:       
                inc  bx
                loop s

                mov  ax, 4c00H
                int  21H
codesg ends
end start